package Demo2;

import java.util.Comparator;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/1/17
 * Time:17:23
 **/
public class NameComparator implements Comparator<Student2> {
    @Override
    public int compare(Student2 o1,Student2 o2) {
        return o1.name.compareTo(o2.name);
    }
}
